#ifndef NET_CAMERA_H
#define NET_CAMERA_H

#include <cstdint>
#include "event_handler.h"
#include "camera_kit.h"

class NetCamera : public OHOS::Media::CameraDeviceCallback, public OHOS::Media::CameraStateCallback, public OHOS::Media::FrameStateCallback
{
public:
    static int32_t Run(int portID);
    static NetCamera* GetInstance(void);
    int32_t Shutdown(void);
    virtual void OnCreated(OHOS::Media::Camera& camera) override;

protected:
    NetCamera(int portID) : CameraDeviceCallback(), CameraStateCallback(), m_port(portID), m_camera(nullptr), m_eventHdlr(){};
    virtual ~NetCamera(){};
    int32_t InitCamera(void);

private:
    static NetCamera *m_instance;
    const int m_port;
    OHOS::Media::Camera* m_camera;
    OHOS::Media::EventHandler m_eventHdlr;
};



#endif